<?php
/* @var $this FeedbackController */
/* @var $model ActUserFeedback */


$this->breadcrumbs=[
	'意见反馈日志'=>['index'],
	'管理',
];

$this->menu=[
	['icon' => 'glyphicon glyphicon-home','label'=>'Manage ActUserFeedback', 'url'=>['admin']],
	['icon' => 'glyphicon glyphicon-plus-sign','label'=>'Create ActUserFeedback', 'url'=>['create']],
];

$this->addPageOption(
	BSHtml::button('高级搜索',array('class' =>'search-button', 'icon' => BSHtml::GLYPHICON_SEARCH,'color' => BSHtml::BUTTON_COLOR_PRIMARY), '#')
);

$this->pageTitle='';
$this->pageSubTitle='';

Yii::app()->clientScript->registerScript('search',
    "
    $('.search-button').click(function(){
        $('.search-form').toggle();
            return false;
        });
        $('.search-form form').submit(function(){
            $('#act-user-feedback-grid').yiiGridView('update', {
            data: $(this).serialize()
        });
        return false;
    });"
);
?>

<div class="row">
	<div class="col-lg-12">
		<div class="panel panel-success">
			<div class="panel-heading">
				<h4>意见反馈列表</h4>
			</div>
			<div class="panel-body">
		        <p>
		        	 你可以在搜索域的前面加上这些符号 (<b>&lt;</b>, <b>&lt;=</b>, <b>&gt;</b>, <b>&gt;=</b>, <b>
		                &lt;&gt;</b>
		            或 <b>=</b>) 构成搜索表达式进行范围性的搜索。
		        </p>
		        <div class="search-form" style="display:none">
		            <?php $this->renderPartial('_search',[
		                'model'=>$model,
		            ]); ?>
		        </div><!-- search-form -->
		
		        <?php $this->widget('bootstrap.widgets.BsGridView',[
		        	'id'=>'act-user-feedback-grid',
		        	'dataProvider'=>$model->search(),
		        	'type'=>'table bordered striped',
		        	'columns'=>[
			        							'id',
						array(
								'name'=>'from_user_id',
								'value'=>'CHtml::value($data,"from_user.nickname")."(".CHtml::value($data,"from_user.mobile").")"'
							),
						'create_time',
						//'content',
						array(
							'name'=>'content',
							'value'=>'mb_substr($data->content, 0, 7, "utf-8")'
						),
						array(
							'name'=>'title',
							'value'=>'mb_substr($data->title, 0, 7, "utf-8")'
						),
						array(
								'name'=>'to_user_id',
								'value'=>'CHtml::value($data,"to_user.nickname")."(".CHtml::value($data,"to_user.mobile").")"'
							),
		/*
						'ip',
						'is_read',
						*/
		        		[
		        			'class'=>'bootstrap.widgets.BsButtonColumn',
							'template'=>'{view}	{delete}'
		        		],
		        	],
				]); ?>
			</div> <!-- end panel-body -->
		</div>
	</div>
</div> <!-- end row -->
	    




